<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>就诊报告详情</title>
  <base th:href="@{http://localhost:9090/}"/>
  <script th:src="@{js/jquery-3.2.1.min.js}"></script>
  <script th:src="@{js/recordview.js}"></script>
  <style>
    #report{
      border: 2px black solid;
      width: 650px;
      height: 600px;
      margin: auto;
      position: relative;
    }
    #head img{
      position: absolute;
      left: 150px;
    }
    #root button{
      margin: 0px 50px 0px 50px;
    }
    th{
      width: 80px;
    }
  </style>
</head>
<body>
<div th:style="'margin: auto'">
  <div id="report">
    <div id="head" th:style="'text-align: center'">
      <image th:src="@{/img/record.png}" width="8%"></image>
      <h3>
        **医院<br>
        诊断报告单
      </h3>
    </div>
    <table border="1" cellpadding="0" cellspacing="0"
           th:style="'margin: auto;width: 600px;text-align: center'">
      <tr >
        <td colspan="2" th:text="姓名+':'"></td>
        <!--<td th:text="${session.patient.name}"></td>-->
        <td colspan="2" th:text="${session.userSession.name}"></td>
        <td colspan="2" th:text="性别+':'"></td>
        <!--<td th:text="${session.patient.gender}"></td>-->
        <td colspan="2" th:text="${session.userSession.gender}"></td>
      </tr>
      <tr>
        <td colspan="2" th:text="年龄+':'"></td>
        <!--<td th:text="${session.patient.age}"></td>-->
        <td colspan="2" th:text="${session.userSession.age}"></td>
        <td colspan="2" th:text="开单日期+':'"></td>
        <td colspan="2" th:text="${#dates.format(record.recordTime,'yyyy年MM月dd日')}"></td>
      </tr>
      <tr>
        <td colspan="2" th:text="门诊编号+':'"></td>
        <td colspan="2" th:text="${record.recordOrdinal}"></td>
        <td colspan="2" th:text="诊断标题+':'"></td>
        <td colspan="2" th:text="${record.recordTitle}"></td>
      </tr>
      <tr>
        <td colspan="2" th:text="会诊科室+':'"></td>
        <td colspan="2" th:text="${record.recordDepartment}"></td>
        <td colspan="2" th:text="住院床号+':'"></td>
        <td colspan="2" th:text="${record.bedNum}"></td>
      </tr>
      <tr>
        <td colspan="1" th:text="诊断信息+':'"></td>
        <td colspan="7" th:text="${record.recordDocument}"></td>
      </tr>
      <tr>
        <td colspan="2" th:text="药品名称"></td>
        <td th:text="药品编号"></td>
        <td th:text="保质期"></td>
        <td th:text="备注" th:style="'width: 150px'"></td>
        <td th:text="单价"></td>
        <td th:text="数量"></td>
        <td th:text="金额"></td>
      </tr>
      <!--<tr th:each="devices,deviceStat:${devicesList}"></tr>-->
      <tr th:each="drug,drugStat:${drugList}">
        <td colspan="2" th:text="${drug.drugName}"></td>
        <td th:text="${drug.drugNum}"></td>
        <td th:text="${drug.expiration}"></td>
        <td th:text="${drug.drugRemark}" th:style="'width: 150px'"></td>
        <td th:text="${drug.drugPrice}"></td>
        <td th:text="${drug.drugNumber}"></td>
        <td th:text="${drug.drugSinglePrice}"></td>
      </tr>
      <tr>
        <td colspan="7" th:text="总价+':'"></td>
        <td th:text="${drugTotalPrice}"></td>
      </tr>
      <tr th:style="'text-align: center'">
        <td colspan="4" th:text="医生签字"></td>
        <td colspan="4" th:text="患者签字"></td>
      </tr>
      <tr>
        <td colspan="4">
          <p th:text="${record.doctorName}"></p>
          <span th:text="${#dates.format(record.recordTime,'yyyy年MM月dd日')}" th:style="'margin-left: 150px'"></span>
        </td>
        <td colspan="4">
          <p th:text="${record.userName}"></p>
          <span th:text="${#dates.format(record.recordTime,'yyyy年MM月dd日')}" th:style="'margin-left: 150px'"></span>
        </td>
      </tr>
    </table>
  </div>
  <div id="root">
    <p th:style="'text-align: center'">
      <button th:text="打印报告" id="print"></button>
      <button th:text="取消" id="back"></button>
    </p>
  </div>
</div>
</body>
</html>